package org.csmzxy.class2333;
class animal{
    public void speak(){
        System.out.println("动物发出叫声");
    }
}
class dog extends animal{
    public void speak(){
        System.out.println("狗发出旺旺");
    }
}
class  cat extends  animal{
    public void  speak(){
        System.out.println("猫发出喵喵");
    }
}
public class example02 {
    public static void main(String[] args){
        animal ani = new animal();
        ani.speak();
        dog dog = new dog();
        dog.speak();
        cat cat = new cat();
        cat.speak();
    }
}